package cn.tedu.mvc.web.servlet;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import java.io.IOException;
public class DataServlet extends HttpServlet {
        @Override
        public void init(ServletConfig config) throws ServletException {
            System.out.println("==Service.init()===");
        }
        @Override
        public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
            System.out.println("==servlet.service()==");
            res.getWriter().println("Hello,Servlet!");
        }
}
